<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<title>古今在线</title>
	<% include  ./template/commonCss.ejs %>
	<link href="<%=resUrl%>/css/my/que_an.css" rel="stylesheet" type="text/css" />
	<% include ./template/commonJs.ejs %>
	<script type="text/javascript" src="<%=resUrl%>/lib/swiper.js"></script>
	<% include ./template/chatLister.ejs %>
</head>

<body ontouchstart>
	<% 
		var topTitle = '我的问答';
		var topReturnType = '';
	%>
	<% include ./template/topReturn.ejs %>
	<div class="weui-tab" >
		<div class="weui-navbar" <%if(locals.token && token != ''){%>style="top:0;"<%}%>>
			<a class="weui-navbar__item weui-bar__item--on" href="#tab1">
				我的问题
			</a>
			<a class="weui-navbar__item" href="#tab2">
				我的回答
			</a>
		</div>
		<div class="weui-tab__bd" <%if(locals.token && token != ''){%>style="top:0.2rem;position: fixed;"<%}%>>
			<div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
				<!--下拉刷新-->
				<div class="weui-pull-to-refresh__layer" style="padding: 5px;">
					<div class="weui-pull-to-refresh__arrow"></div>
					<div class="weui-pull-to-refresh__preloader"></div> 
					<div class="down">下拉刷新</div>
					<div class="up">释放刷新</div>
					<div class="refresh">正在刷新</div>
				</div>
				<div id="list-content">

				</div>
				<script id="list" type="text/html">
					{{each list}}
						<div class="post" onclick="javascrpt:visitUrl('/post?id={{$value.id}}',true)">
							<div class="avater" style="background:url({{avater}}) center center no-repeat;background-size:100% auto;"></div>
							<div class="container">
								<div class="name">{{name}}</div>
								<div class="title">{{$value.title}}</div>
								<div class="photos">
									{{$value.image | splitImages}}
									{{each $imports.imgs as img i}}
										<div class="photo" style="background:url({{img}}?x-oss-process=image/resize,w_600) center center no-repeat;background-size:100% auto;"></div>
									{{/each}}
									<div class="auto-height"></div>
								</div>
								<div class="auto-height"></div>
							</div>
							<div class="auto-height"></div>
						</div>
					{{/each}}
				</script>
				<div class="weui-loadmore" id="loadmore">
					<i class="weui-loading"></i>
					<span class="weui-loadmore__tips">正在加载</span>
				</div>
				<div class="weui-loadmore weui-loadmore_line" style="display:none;" id="nomore">
					<span class="weui-loadmore__tips">到底了</span>
				</div>
			</div>
			<div id="tab2" class="weui-tab__bd-item">
				<!--下拉刷新-->
				<div class="weui-pull-to-refresh__layer" style="padding: 0px;">
					<div class="weui-pull-to-refresh__arrow"></div>
					<div class="weui-pull-to-refresh__preloader"></div>
					<div class="down">下拉刷新</div>
					<div class="up">释放刷新</div>
					<div class="refresh">正在刷新</div>
				</div>
				<div id="list-content2">

				</div>
				<script id="list2" type="text/html">
					{{each list}}
						<div class="answer" onclick="javascrpt:visitUrl('/post?id={{$value.id}}',true)">
							<div class="avater" style="background:url({{$value.publishUserDetail.photo}}) center center no-repeat;background-size:100% auto;"></div>
							<div class="container">
								<div class="name">{{$value.publishUserDetail.name}}</div>
								<div class="title">{{$value.content}}</div>
								<div class="time">
									{{$value.createDate | TimestampToTime}}
									<svg t="1555737485085" class="icon msg" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5414" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
										<defs><style type="text/css"></style></defs>
										<path d="M512.096085 0.00001a511.997995 511.997995 0 0 0-411.837996 816.316992c5.44 7.36 16.96 21.76 16.96 21.76l-40 164.479998 174.399999-49.599999 3.2 1.92A511.997995 511.997995 0 1 0 512.095085 0.00001z m0 959.995991a445.437996 445.437996 0 0 1-231.038998-64l-3.2-1.92-134.399998 33.92 34.239999-119.038999a450.877996 450.877996 0 0 1-38.719999-50.239999 447.997996 447.997996 0 1 1 373.119996 201.279998z" p-id="5415" fill="#8a8a8a"></path><path d="M224.097088 511.998005a63.999999 63.999999 0 1 0 127.999999 0 63.999999 63.999999 0 1 0-127.999999 0zM448.096086 511.998005a63.999999 63.999999 0 1 0 127.999998 0 63.999999 63.999999 0 1 0-127.999998 0zM672.095083 511.998005a63.999999 63.999999 0 1 0 127.999999 0 63.999999 63.999999 0 1 0-127.999999 0z" p-id="5416" fill="#8a8a8a">
										</path>
									</svg>
								</div>
								<div class="auto-height"></div>
							</div>
							<div class="auto-height"></div>
						</div>
					{{/each}}
				</script>
				<div class="weui-loadmore" id="loadmore2">
					<i class="weui-loading"></i>
					<span class="weui-loadmore__tips">正在加载</span>
				</div>
				<div class="weui-loadmore weui-loadmore_line" style="display:none;" id="nomore2">
					<span class="weui-loadmore__tips">到底了</span>
				</div>
			</div>
		</div>
	</div>
	<div class="cdetail-bottom">
		<div class="cdetail-bottom-price open-popup" id="create_que_botton">我要发布问题</div>
	</div>
	<!-- 创建回答问题 -->
	<div id="create_que" class='weui-popup__container' <%if(locals.token && token != ''){%>style="top:0;"<%}%> >
		<div class="weui-popup__overlay"></div>
		<div class="weui-popup__modal">
			<header class='demos-header'>
				<h1 class="demos-title">发布帖子</h1>
			</header>
			<div class="weui-cells weui-cells_form">
				<div class="weui-cell">
					<div class="weui-cell__hd" style="width:2rem;"><label class="weui-label">帖子标题</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" type="text" id="title" value="" placeholder="请输入标题内容" />
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd" style="width:2rem;">
						<label class="weui-label" style="width:100%;">藏品图片</label>
					</div>
					<div class="weui-cell__bd">
						<div class="weui-uploader">
							<div class="weui-uploader__bd">
								<input id="showImages" type="hidden" value=""/>
								<div id="wrap">
									<div id="ossfile">
										
									</div>
								</div>
								<div id="container">
									<a id="selectfiles" href="javascript:void(0);" class='btn'>
										<input type="file" id="imageUpload" accept="image/*" multiple style="z-index:3;position:absolute;left:0;top:0;width:4rem;height:4rem;opacity:0;">
										<div>
											<svg t="1552873504326" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3451" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
												<defs>
													<style type="text/css"></style>
												</defs>
												<path
													d="M956.67712 843.67872c-2.69312 50.048-68.03456 38.34368-102.16448 38.34368H127.86688c-13.4912 0-26.38848 1.21344-38.8352-5.23264-20.09088-10.41408-18.99008-31.89248-18.99008-50.77504v-68.4032V292.8128 180.48512c0-49.51552 67.21024-38.39488 99.28704-38.39488h663.45984c30.8736 0 68.70016-5.96992 98.94912 2.34496 38.00064 10.44992 24.9344 90.77248 24.9344 118.53312v226.16576l0.00512 354.54464c0 33.01376 51.2 33.01376 51.2 0V499.32288 270.09536c0-37.52448 7.49056-86.95296-6.6048-122.88-22.44608-57.21088-77.39904-56.32512-127.80032-56.32512H109.07136c-50.88256 0-87.5776 40.45312-90.21952 89.54368-0.53248 9.9072 0 19.9936 0 29.91104v613.8368c0 18.16064-0.23552 35.2768 6.6048 52.71552 13.97248 35.61984 48.81408 56.33024 86.3232 56.33024h794.75712c54.46656 0 98.24256-32.0256 101.34528-89.54368 1.77152-33.01376-49.43872-32.83968-51.20512-0.00512z"
													p-id="3452" fill="#bfbfbf"></path>
												<path
													d="M664.8576 335.2576c-1.4848 45.8752-36.16256 80.54784-82.03264 82.03264-45.85984 1.4848-80.62464-38.38976-82.03264-82.03264-1.4848-45.86496 38.38976-80.62464 82.03264-82.03264 45.85984-1.4848 80.62464 38.38976 82.03264 82.03264 1.06496 32.93184 52.27008 33.03424 51.2 0-2.40128-74.2144-59.02336-130.83648-133.23264-133.23264-74.17344-2.40128-130.94912 62.63296-133.23264 133.23264-2.40128 74.17344 62.63296 130.94912 133.23264 133.23264 74.17344 2.40128 130.94912-62.63296 133.23264-133.23264 1.07008-33.03424-50.13504-32.92672-51.2 0zM62.55616 700.80512l229.46304-186.02496h-36.20352l445.44512 389.93408c24.7296 21.65248 61.09184-14.4128 36.1984-36.1984l-445.44-389.9392c-11.34592-9.9328-24.79616-9.24672-36.20352 0L26.35264 664.60672c-25.66144 20.79744 10.79808 56.79104 36.20352 36.1984z"
													p-id="3453" fill="#bfbfbf"></path>
												<path
													d="M600.92416 751.11424l164.69504-185.1392h-36.1984c78.24384 75.37152 156.4928 150.7328 234.74688 226.0992 23.77728 22.90176 60.02176-13.2608 36.1984-36.1984-78.24384-75.37152-156.4928-150.7328-234.74688-226.0992-9.59488-9.24672-26.79808-10.5728-36.1984 0a2831453.4144 2831453.4144 0 0 0-164.69504 185.1392c-21.86752 24.576 14.21312 60.91776 36.1984 36.1984z"
													p-id="3454" fill="#bfbfbf"></path>
											</svg>
										</div>
										<div class="text">上传图片</div>
									</a>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="weui-cells__title">帖子描述</div>
				<div class="weui-cells weui-cells_form">
				<div class="weui-cell">
					<div class="weui-cell__bd">
					<textarea class="weui-textarea" id="content" placeholder="请输入文本" rows="10" name="content"></textarea>
					<div class="weui-textarea-counter"><span>0</span>/200</div>
					</div>
				</div>
				</div>
				<div class="weui-cell">
					<a href="javascript:;" class="weui-btn weui-btn_primary close-popup ok" id="confirmPost">确认提交</a>
					<a href="javascript:;" class="weui-btn weui-btn_primary close-popup cancel">取消提交</a>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="<%=resUrl%>/js/my/que_an.js"></script>
	<% include ./template/upload.ejs %>
</body>

</html>